﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Filmi.NonSemantic;

namespace Filmi
{
    public partial class _Default : System.Web.UI.Page
    {
        Kontrol  kontrolni = new Kontrol();
        protected void Page_Load(object sender, EventArgs e)
        {
            kontrolni.PreberiOwlProfil(Server.MapPath( @"~\App_Data\zelvak.owl"));
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
          
            if (TextBox1.Text != "")
            {

                //poglej v bazo
             

                //če ni v bazi pojdi na splet
                var movieData = kontrolni.getMovieData(TextBox1.Text);
                if (movieData == null)
                {
                    return;
                }
                //polni bazo


                ImageMovie.Visible = true;
                ImageMovie.ImageUrl = movieData.ImdbReader.PosterLarge;

            }

        }
    }
}
